<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.3.0">


  <link rel="apple-touch-icon" sizes="180x180" href="/yuwanzi.io/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/yuwanzi.io/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/yuwanzi.io/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/yuwanzi.io/images/logo.svg" color="#222">

<link rel="stylesheet" href="/yuwanzi.io/css/main.css">



<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/css/all.min.css">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css">

<script class="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"suyuhuan.gitee.io","root":"/yuwanzi.io/","images":"/yuwanzi.io/images","scheme":"Muse","version":"8.2.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":false,"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"Suche...","empty":"We didn't find any results for the search: ${query}","hits_time":"${hits} results found in ${time} ms","hits":"${hits} results found"}};
  </script>
<meta name="description" content="什么是SolrCloudSolrCloud是基于Solr和Zookeeper的分布式搜索方案,它的主要思想是使用Zookeeper作为集群的配置信息中心。 SolrCloud的特点1.近实时搜索立即推送式的replication（也支持慢推送）。可以在秒内检索到新加入索引。 2.自动容错SolrCloud对索引分片,并对每个分片创建多个Replication。每个Replication都可以对外">
<meta property="og:type" content="article">
<meta property="og:title" content="SolrCloud初体验">
<meta property="og:url" content="https://suyuhuan.gitee.io/yuwanzi.io/2016/06/30/2016-06-30-solrcloud/index.html">
<meta property="og:site_name" content="玉丸子 | Blog">
<meta property="og:description" content="什么是SolrCloudSolrCloud是基于Solr和Zookeeper的分布式搜索方案,它的主要思想是使用Zookeeper作为集群的配置信息中心。 SolrCloud的特点1.近实时搜索立即推送式的replication（也支持慢推送）。可以在秒内检索到新加入索引。 2.自动容错SolrCloud对索引分片,并对每个分片创建多个Replication。每个Replication都可以对外">
<meta property="og:locale">
<meta property="og:image" content="http://ww4.sinaimg.cn/mw690/63503acbjw1f67ocs5srhj207g05m3yl.jpg">
<meta property="og:image" content="http://ww4.sinaimg.cn/mw690/63503acbjw1f67oct3xegj20rx0qfdht.jpg">
<meta property="og:image" content="http://ww2.sinaimg.cn/mw690/63503acbjw1f67ocpgc1zj20d80cwdjc.jpg">
<meta property="og:image" content="http://ww3.sinaimg.cn/mw690/63503acbjw1f67ocqpcfqj20he097acw.jpg">
<meta property="og:image" content="http://ww3.sinaimg.cn/mw690/63503acbjw1f67ocr82b3j20ig04ptas.jpg">
<meta property="article:published_time" content="2016-06-30T10:00:00.000Z">
<meta property="article:modified_time" content="2020-11-07T00:58:17.000Z">
<meta property="article:author" content="玉丸子">
<meta property="article:tag" content="全文检索引擎">
<meta property="article:tag" content="Solr">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://ww4.sinaimg.cn/mw690/63503acbjw1f67ocs5srhj207g05m3yl.jpg">


<link rel="canonical" href="https://suyuhuan.gitee.io/yuwanzi.io/2016/06/30/2016-06-30-solrcloud/">


<script class="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh'
  };
</script>
<title>SolrCloud初体验 | 玉丸子 | Blog</title>
  




  <noscript>
  <style>
  body { margin-top: 2rem; }

  .use-motion .menu-item,
  .use-motion .sidebar,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header {
    visibility: visible;
  }

  .use-motion .header,
  .use-motion .site-brand-container .toggle,
  .use-motion .footer { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle,
  .use-motion .custom-logo-image {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line {
    transform: scaleX(1);
  }

  .search-pop-overlay, .sidebar-nav { display: none; }
  .sidebar-panel { display: block; }
  </style>
</noscript>

<link rel="alternate" href="/yuwanzi.io/atom.xml" title="玉丸子 | Blog" type="application/atom+xml">
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="Navigationsleiste an/ausschalten" role="button">
    </div>
  </div>

  <div class="site-meta">

    <a href="/yuwanzi.io/" class="brand" rel="start">
      <i class="logo-line"></i>
      <h1 class="site-title">玉丸子 | Blog</h1>
      <i class="logo-line"></i>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>







</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          Inhaltsverzeichnis
        </li>
        <li class="sidebar-nav-overview">
          Übersicht
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BB%80%E4%B9%88%E6%98%AFSolrCloud"><span class="nav-number">1.</span> <span class="nav-text">什么是SolrCloud</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#SolrCloud%E7%9A%84%E7%89%B9%E7%82%B9"><span class="nav-number">2.</span> <span class="nav-text">SolrCloud的特点</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-%E8%BF%91%E5%AE%9E%E6%97%B6%E6%90%9C%E7%B4%A2"><span class="nav-number">2.1.</span> <span class="nav-text">1.近实时搜索</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-%E8%87%AA%E5%8A%A8%E5%AE%B9%E9%94%99"><span class="nav-number">2.2.</span> <span class="nav-text">2.自动容错</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-%E6%9F%A5%E8%AF%A2%E6%97%B6%E8%87%AA%E5%8A%A8%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1"><span class="nav-number">2.3.</span> <span class="nav-text">3.查询时自动负载均衡</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#4-%E9%9B%86%E4%B8%AD%E5%BC%8F%E7%9A%84%E9%85%8D%E7%BD%AE%E4%BF%A1%E6%81%AF"><span class="nav-number">2.4.</span> <span class="nav-text">4.集中式的配置信息</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E7%BB%93%E6%9E%84%E5%88%86%E6%9E%90"><span class="nav-number">3.</span> <span class="nav-text">结构分析</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-%E5%AE%9E%E7%8E%B0%E6%80%9D%E8%B7%AF"><span class="nav-number">3.1.</span> <span class="nav-text">1.实现思路</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-%E7%BB%93%E6%9E%84"><span class="nav-number">3.2.</span> <span class="nav-text">2.结构</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#SolrCloud%E7%9A%84%E6%90%AD%E5%BB%BA"><span class="nav-number">4.</span> <span class="nav-text">SolrCloud的搭建</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-Zookeeper"><span class="nav-number">4.1.</span> <span class="nav-text">1.Zookeeper</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-Solr%E5%AE%9E%E4%BE%8B"><span class="nav-number">4.2.</span> <span class="nav-text">2.Solr实例</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-%E8%AE%BE%E7%BD%AEShard"><span class="nav-number">4.3.</span> <span class="nav-text">3.设置Shard</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Spring%E6%95%B4%E5%90%88SolrCloud"><span class="nav-number">5.</span> <span class="nav-text">Spring整合SolrCloud</span></a></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">玉丸子</p>
  <div class="site-description" itemprop="description">这里是玉丸子的个人博客,与你一起发现更大的世界。</div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/yuwanzi.io/archives">
          <span class="site-state-item-count">68</span>
          <span class="site-state-item-name">Artikel</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/yuwanzi.io/categories/">
        <span class="site-state-item-count">39</span>
        <span class="site-state-item-name">Kategorien</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/yuwanzi.io/tags/">
        <span class="site-state-item-count">46</span>
        <span class="site-state-item-name">schlagwörter</span></a>
      </div>
  </nav>
</div>



        </div>
      </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top" role="button">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh">
    <link itemprop="mainEntityOfPage" href="https://suyuhuan.gitee.io/yuwanzi.io/2016/06/30/2016-06-30-solrcloud/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/yuwanzi.io/images/avatar.gif">
      <meta itemprop="name" content="玉丸子">
      <meta itemprop="description" content="这里是玉丸子的个人博客,与你一起发现更大的世界。">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="玉丸子 | Blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          SolrCloud初体验
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">Veröffentlicht am</span>

      <time title="Erstellt: 2016-06-30 18:00:00" itemprop="dateCreated datePublished" datetime="2016-06-30T18:00:00+08:00">2016-06-30</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">Bearbeitet am</span>
        <time title="Geändert am: 2020-11-07 08:58:17" itemprop="dateModified" datetime="2020-11-07T08:58:17+08:00">2020-11-07</time>
      </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">in</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/yuwanzi.io/categories/%E5%90%8E%E7%AB%AF/" itemprop="url" rel="index"><span itemprop="name">后端</span></a>
        </span>
          . 
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/yuwanzi.io/categories/%E5%90%8E%E7%AB%AF/%E5%85%A8%E6%96%87%E6%A3%80%E7%B4%A2/" itemprop="url" rel="index"><span itemprop="name">全文检索</span></a>
        </span>
          . 
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/yuwanzi.io/categories/%E5%90%8E%E7%AB%AF/%E5%85%A8%E6%96%87%E6%A3%80%E7%B4%A2/Solr/" itemprop="url" rel="index"><span itemprop="name">Solr</span></a>
        </span>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <p><img src="http://ww4.sinaimg.cn/mw690/63503acbjw1f67ocs5srhj207g05m3yl.jpg"></p>
<h3 id="什么是SolrCloud"><a href="#什么是SolrCloud" class="headerlink" title="什么是SolrCloud"></a>什么是SolrCloud</h3><p>SolrCloud是基于Solr和Zookeeper的分布式搜索方案,它的主要思想是使用Zookeeper作为集群的配置信息中心。</p>
<h3 id="SolrCloud的特点"><a href="#SolrCloud的特点" class="headerlink" title="SolrCloud的特点"></a>SolrCloud的特点</h3><h4 id="1-近实时搜索"><a href="#1-近实时搜索" class="headerlink" title="1.近实时搜索"></a>1.近实时搜索</h4><p>立即推送式的replication（也支持慢推送）。可以在秒内检索到新加入索引。</p>
<h4 id="2-自动容错"><a href="#2-自动容错" class="headerlink" title="2.自动容错"></a>2.自动容错</h4><p>SolrCloud对索引分片,并对每个分片创建多个Replication。每个Replication都可以对外提供服务。一个Replication挂掉不会影响索引服务。更强大的是，它还能自动的在其它机器上帮你把失败机器上的索引Replication重建并投入使用。</p>
<h4 id="3-查询时自动负载均衡"><a href="#3-查询时自动负载均衡" class="headerlink" title="3.查询时自动负载均衡"></a>3.查询时自动负载均衡</h4><p>SolrCloud索引的多个Replication可以分布在多台机器上,均衡查询压力。如果查询压力大，可以通过扩展机器，增加Replication来减缓。</p>
<h4 id="4-集中式的配置信息"><a href="#4-集中式的配置信息" class="headerlink" title="4.集中式的配置信息"></a>4.集中式的配置信息</h4><p>SolrCloud可以将配置文件上传到Zookeeper,由Zookeeper对配置文件进行管理。</p>
<h3 id="结构分析"><a href="#结构分析" class="headerlink" title="结构分析"></a>结构分析</h3><p>为了减少处理压力,SolrCloud需要由多台服务器共同完成索引和搜索。</p>
<h4 id="1-实现思路"><a href="#1-实现思路" class="headerlink" title="1.实现思路"></a>1.实现思路</h4><p>SolrCloud将索引数据进行分片(Shard),每个分片由多台服务器共同完成。</p>
<h4 id="2-结构"><a href="#2-结构" class="headerlink" title="2.结构"></a>2.结构</h4><p><img src="http://ww4.sinaimg.cn/mw690/63503acbjw1f67oct3xegj20rx0qfdht.jpg"></p>
<p><strong>物理结构</strong><br>SolrCloud由三个Solr服务器组成,每个Solr服务器包含2个Core。</p>
<p><strong>逻辑结构</strong><br>一个Collection包含2个Shard,每个Shard由3个core组成(一个Leader,两个Replication)。</p>
<p><strong>Collection</strong><br>Collection是一个在逻辑意义上完整的索引结构,它常常被划分为一个或多个Shard分片,它们使用相同的配置信息。如果Shard数超过一个，它就是分布式索引，SolrCloud让你通过Collection名称引用它，而不需要关心分布式检索时需要使用的和Shard相关参数。</p>
<p><strong>Core</strong><br>一个Solr中包含一个或者多个Solr Core，每个Solr Core可以独立提供索引和查询功能，每个Solr Core对应一个索引或者Collection的Shard，Solr Core的提出是为了增加管理灵活性和共用资源。在SolrCloud中有个不同点是它使用的配置是在Zookeeper中的，传统的Solr core的配置文件是在磁盘上的配置目录中。</p>
<p><strong>Shard</strong><br>Collection的逻辑分片。每个Shard被化成一个或者多个replicas，通过选举确定哪个是Leader。</p>
<p><strong>Replication</strong><br>在master-slave结构中,Replication是一个从节点,同一个Shard下主从节点存储的数据是一致的。</p>
<p><strong>Leader</strong><br>在master-slave结构中,Leader是一个主节点,Leader是赢得选举的Replication。选举可以发生在任何时间，但是通常它们仅在某个Solr实例发生故障时才会触发。当索引documents时，SolrCloud会传递它们到此Shard对应的Leader，Leader再分发它们到全部Shard的Replication。</p>
<h3 id="SolrCloud的搭建"><a href="#SolrCloud的搭建" class="headerlink" title="SolrCloud的搭建"></a>SolrCloud的搭建</h3><h4 id="1-Zookeeper"><a href="#1-Zookeeper" class="headerlink" title="1.Zookeeper"></a>1.Zookeeper</h4><p>SolrCloud需要Zookeeper进行管理,所以需要先安装Zookeeper。</p>
<ul>
<li><p>.解压缩zookeeper.tar.gz,并复制出3个Zookeeper实例。</p>
</li>
<li><p>.进入zookeeper01目录,创建一个data文件夹,并在data中创建一个myid文件,内容为1(其他Zookeeper实例为2和3)。</p>
</li>
<li><p>进入conf文件夹,将zoo_sample.cfg改名为zoo.cfg</p>
</li>
<li><p>vim zoo.cfg 修改dataDir=data文件夹所在的目录,<br>添加:<br>server.myid的值=ip:每个Zookeeper服务器之间的通讯端口:Zookeeper与其他应用的通讯端口。(每个Zookeeper实例都需要添加这行内容)<br>例如:</p>
<p><img src="http://ww2.sinaimg.cn/mw690/63503acbjw1f67ocpgc1zj20d80cwdjc.jpg"></p>
</li>
</ul>
<h4 id="2-Solr实例"><a href="#2-Solr实例" class="headerlink" title="2.Solr实例"></a>2.Solr实例</h4><ul>
<li><p>安装一个单机的Solr实例,并复制成4份,分别对应4个SolrHome。</p>
</li>
<li><p>修改SolrHome的solr.xml文件</p>
<p><img src="http://ww3.sinaimg.cn/mw690/63503acbjw1f67ocqpcfqj20he097acw.jpg"></p>
</li>
<li><p>将配置文件上传到Zookeeper,当配置文件发生改变时,需要重新上传。</p>
</li>
</ul>
<pre><code> java -classpath .:/usr/local/solr-cloud/solr-lib/* org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost 127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183 -confdir /usr/local/solr-cloud/solrhome01/collection1/conf  -confname solr-conf

-cmd upconfig 上传配置文件命令
-zkhost Zookeeper集群的ip与端口
-confdir 配置文件的目录
-confname 上传到Zookeeper后的文件夹名称

其中参数/usr/local/solr-cloud/solr-lib/可以自己创建，内容如下：
        复制tomcat/webapps/solr/WEB-INF/lib下所有jar包
        复制example/lib/ext下所有jar包
        复制example/resources/log4j.properties</code></pre>
<ul>
<li><p>通知Solr实例Zookeeper的地址,需要修改tomcat/bin/catalina.sh<br>添加一行:JAVA_OPTS=”-DzkHost=Zookeeper集群的地址列表”</p>
<p><img src="http://ww3.sinaimg.cn/mw690/63503acbjw1f67ocr82b3j20ig04ptas.jpg"></p>
</li>
</ul>
<h4 id="3-设置Shard"><a href="#3-设置Shard" class="headerlink" title="3.设置Shard"></a>3.设置Shard</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">http:&#x2F;&#x2F;web容器&#x2F;solr&#x2F;admin&#x2F;collections?action&#x3D;CREATE&amp;name&#x3D;Collection名称&amp;numShards&#x3D;Shard个数&amp;replicationFactor&#x3D;Replication个数</span><br></pre></td></tr></table></figure>
<p>例:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">http:&#x2F;&#x2F;192.168.145.150:8080&#x2F;solr&#x2F;admin&#x2F;collections?action&#x3D;CREATE&amp;name&#x3D;collection2&amp;numShards&#x3D;2&amp;replicationFactor&#x3D;2</span><br><span class="line">上面的命令为 创建一个name为collection2的Collection,并分成了2个Shard,每个Shard有2个Replication</span><br></pre></td></tr></table></figure>
<p>删除一个Collection</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">http:&#x2F;&#x2F;192.168.145.150:8080&#x2F;solr&#x2F;admin&#x2F;collections?action&#x3D;DELETE&amp;name&#x3D;collection1</span><br><span class="line">上面的命令为 删除一个name为collection1的Collection</span><br></pre></td></tr></table></figure>
<h3 id="Spring整合SolrCloud"><a href="#Spring整合SolrCloud" class="headerlink" title="Spring整合SolrCloud"></a>Spring整合SolrCloud</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">&lt;!-- SolrCloud --&gt;</span><br><span class="line">	&lt;bean id&#x3D;&quot;cloudSolrServer&quot; class&#x3D;&quot;org.apache.solr.client.solrj.impl.CloudSolrServer&quot;&gt;</span><br><span class="line">		&lt;constructor-arg name&#x3D;&quot;zkHost&quot;</span><br><span class="line">			value&#x3D;&quot;192.168.145.136:2181,192.168.145.136:2182,192.168.145.136:2183&quot; &#x2F;&gt;</span><br><span class="line">		&lt;!-- 设置默认搜索的Collection --&gt;</span><br><span class="line">		&lt;property name&#x3D;&quot;defaultCollection&quot; value&#x3D;&quot;collection2&quot; &#x2F;&gt;</span><br><span class="line">	&lt;&#x2F;bean&gt;</span><br></pre></td></tr></table></figure>
    </div>

    
    
    

    <footer class="post-footer">
          <div class="post-tags">
              <a href="/yuwanzi.io/tags/%E5%85%A8%E6%96%87%E6%A3%80%E7%B4%A2%E5%BC%95%E6%93%8E/" rel="tag"># 全文检索引擎</a>
              <a href="/yuwanzi.io/tags/Solr/" rel="tag"># Solr</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/yuwanzi.io/2016/06/27/2016-06-27-redis-cluster01/" rel="prev" title="如何搭建与维护一个Redis集群">
                  <i class="fa fa-chevron-left"></i> 如何搭建与维护一个Redis集群
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/yuwanzi.io/2016/07/03/2016-07-03-activemq/" rel="next" title="ActiveMQ消息队列">
                  ActiveMQ消息队列 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>







<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      const activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      const commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>
</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">玉丸子</span>
</div>
  <div class="powered-by">Erstellt mit  <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/muse/" class="theme-link" rel="noopener" target="_blank">NexT.Muse</a>
  </div>

    </div>
  </footer>

  
  <script src="//cdn.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js"></script>
<script src="/yuwanzi.io/js/utils.js"></script><script src="/yuwanzi.io/js/motion.js"></script><script src="/yuwanzi.io/js/schemes/muse.js"></script><script src="/yuwanzi.io/js/next-boot.js"></script>

  






  





</body>
</html>
